<?php

return array(
    'router' => array(
	'routes' => array(
	    'users' => array(
		'type' => 'Literal',
		'options' => array(
		    'route' => '/users' ,
		    'defaults' => array(
			'__NAMESPACE__' => 'Users\Controller',
			'controller'	=> 'Index' ,	
			'action'	=> 'index' , 	
		    ),
		),
		'may_terminate' => true ,
		'child_routes' => array(
		    'default' => array(
			'type' => 'Segment' ,
			'options' => array(
                            'route'    => '/[:controller[/:action]]',
                            'constraints' => array(
                                'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
                            ),
                            'defaults' => array(
			    
                            ),
                        ),
		    ),
                    'user-manager' => array(
                        'type'    => 'Segment',
                        'may_terminate' => true,
                        'options' => array(
                            'route'    => '/user-manager[/:action[/:id]]',
                            'constraints' => array(
                                    'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
                                    'id'     => '[a-zA-Z0-9_-]*',
                            ),
                            'defaults' => array(
                                    'controller' => 'Users\Controller\UserManager',
                                    'action'     => 'index',
                            ),
                        ),
                    ),
                    'group-chat' => array(
                        'type'    => 'Segment',
                        'options' => array(
                                'route'    => '/group-chat[/:action[/:id]]',
                                'constraints' => array(
                                        'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
                                        'id'     => '[a-zA-Z0-9_-]*',
                                ),
                                'defaults' => array(
                                        'controller' => 'Users\Controller\GroupChat',
                                        'action'     => 'index',
                                ),
                        ),
                    ),
                    'search' => array(
                        'type'    => 'Segment',
                        'options' => array(
                                'route'    => '/search[/:action]',
                                'constraints' => array(
                                        'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
                                ),
                                'defaults' => array(
                                        'controller' => 'Users\Controller\Search',
                                        'action'     => 'index',
                                ),
                        ),
                    ),        
		), 
	    ),
	),
    ),
    
    'controllers' => array(
	'invokables' => array(
	    'Users\Controller\Index' => 'Users\Controller\IndexController' ,
	    'Users\Controller\Register' => 'Users\Controller\RegisterController' ,
            'Users\Controller\Login' => 'Users\Controller\LoginController' ,
            'Users\Controller\UserManager' => 'Users\Controller\UserManagerController' ,
            'Users\Controller\GroupChat' => 'Users\Controller\GroupChatController' ,
            'Users\Controller\Search' => 'Users\Controller\SearchController' ,
	),
    ),
    
    'view_manager' => array(
	'template_path_stack' => array(
	    'users' => __DIR__ . '/../view/'
	),
        'template_map' => array(
            //'layout/layout'           => __DIR__ . '/../view/layout/default-layout.phtml',
            //'layout/myaccount'           => __DIR__ . '/../view/layout/myaccount.phtml',
    	),
    ),
    // MODULE CONFIGURATIONS
    'module_config' => array(
        'upload_location'           => __DIR__ . '/../data/uploads',
        'image_upload_location'		=> __DIR__ . '/../data/images',
        'search_index'		=> __DIR__ . '/../data/search_index'		
    ),
);
